package com.ruoyi.account.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户对象 tb_user
 * 
 * @author ruoyi
 * @date 2025-08-22
 */
public class TbUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long userId;

    /** email */
    @Excel(name = "email")
    private String email;

    /** nickname */
    @Excel(name = "nickname")
    private String nickName;

    /** user type（0:tourist 1:registered user 2:major customer） */
    @Excel(name = "user type", readConverterExp = "0=:tourist,1=:registered,u=ser,2=:major,c=ustomer")
    private String userType;

    /** phonenumber */
    @Excel(name = "phonenumber")
    private String phonenumber;

    /** gender（0:male 1:female 2:unknown） */
    @Excel(name = "gender", readConverterExp = "0=:male,1=:female,2=:unknown")
    private String gender;

    /** password */
    @Excel(name = "password")
    private String password;

    /** account status（0:normal 1:deactivated） */
    @Excel(name = "account status", readConverterExp = "0=:normal,1=:deactivated")
    private String status;

    /** delete flag（0:normal 2:delete） */
    private String delFlag;

    /** last login IP */
    @Excel(name = "last login IP")
    private String loginIp;

    /** last login time */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "last login time", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loginDate;

    /** password last update time */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "password last update time", width = 30, dateFormat = "yyyy-MM-dd")
    private Date pwdUpdateDate;

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setNickName(String nickName) 
    {
        this.nickName = nickName;
    }

    public String getNickName() 
    {
        return nickName;
    }
    public void setUserType(String userType) 
    {
        this.userType = userType;
    }

    public String getUserType() 
    {
        return userType;
    }
    public void setPhonenumber(String phonenumber) 
    {
        this.phonenumber = phonenumber;
    }

    public String getPhonenumber() 
    {
        return phonenumber;
    }
    public void setGender(String gender) 
    {
        this.gender = gender;
    }

    public String getGender() 
    {
        return gender;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    public void setLoginIp(String loginIp) 
    {
        this.loginIp = loginIp;
    }

    public String getLoginIp() 
    {
        return loginIp;
    }
    public void setLoginDate(Date loginDate) 
    {
        this.loginDate = loginDate;
    }

    public Date getLoginDate() 
    {
        return loginDate;
    }
    public void setPwdUpdateDate(Date pwdUpdateDate) 
    {
        this.pwdUpdateDate = pwdUpdateDate;
    }

    public Date getPwdUpdateDate() 
    {
        return pwdUpdateDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("email", getEmail())
            .append("nickName", getNickName())
            .append("userType", getUserType())
            .append("phonenumber", getPhonenumber())
            .append("gender", getGender())
            .append("password", getPassword())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("loginIp", getLoginIp())
            .append("loginDate", getLoginDate())
            .append("pwdUpdateDate", getPwdUpdateDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
